// xc/components/widgets/applyreslut.js
// 审核结果
Component({
  options: {
    addGlobalClass: true,
    multipleSlots: true
  },
  /**
   * 组件的属性列表
   */
  properties: {
    ishow:{
      type:Boolean,
      value:false
    },
    title: {
      type: String,
      value: "审核"       
    },
    actstatus: {
      type: String,
      value: "waiting"       
    }    
  },

  /**
   * 组件的初始数据
   */
  data: {
    icostatus: {
      waiting: { "code": "waiting", "color": "#3D88FD", "title": "您的提交正在审核中...", text: "请耐心等待，1-3个工作日完成审核" },
      success: { "code": "success", "color": "#6DD950", "title": "您的审核已通过...", text: "" },
      fail: { "code": "warn", "color": "#F32A00", "title": "您的审核未通过..", text: "请耐心等待，1-3个工作日完成审核" },
      custom: { "code": "waiting", "color": "#F32A00", "title": "您的审核未通过..", text: "请耐心等待，1-3个工作日完成审核" },      
    },  
  },
  ready(){
    // if (!this.data.activeColor) {
      var app = getApp();
      var prothem = app.globalData.configdata.prothem.themcolor.config
      // console.log("prothem")
      // console.log(prothem)
      // var updatemodel = { themcolor: prothem,'waiting.color':prothem.primarycolor}

      // var updatemodel = { activeColor: prothem.primarycolor, activefontColor: prothem.pribtncolor, inactiveColor: "#FAFAFA", inactivefontColor: 'rgba(153, 153, 153, 1)' }
      // this.setData(updatemodel);
    // }
  },
  /**
   * 组件的方法列表
   */
  methods: {
    toindex: function () {
      var app = getApp();

      wx.reLaunch({ url: app.globalData.configdata["basic"]["homeurl"] });
    },
    showmodel(title,text,code,color,actstatus){
      var upmodel={};
      upmodel["ishow"]=true;      
      upmodel["actstatus"]=actstatus?actstatus:"custom"
      upmodel["icostatus.custom.title"]=title
      upmodel["icostatus.custom.text"]=text
      if(code)
      {
        upmodel["icostatus.custom.code"]=code
      }
      if(color){
        upmodel["icostatus.custom.color"]=color
      } 
      this.setData(upmodel)
    }
  }
})
